
public class Test {
    public static void main(String[] args) {
        // 创建两个 ComparableCircle 对象
        ComparableCircle circle1 = new ComparableCircle(6.0);
        ComparableCircle circle2 = new ComparableCircle(9.0);

        // 比较两个圆的面积，并输出比较结果
        if (circle1.compareTo(circle2) > 0)
            System.out.println("Circle1 is larger");
        else if (circle1.compareTo(circle2) < 0)
            System.out.println("Circle2 is larger");
        else
            System.out.println("Both circles are of the same size");
    }
}